package com.taobao.api.request;

import java.util.Date;
import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;

import com.taobao.api.TaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.TmallEaiOrderRefundOrderHoldResponse;
import com.taobao.api.ApiRuleException;
/**
 * TOP API: tmall.eai.order.refund.order.hold request
 * 
 * @author auto create
 * @since 1.0, 2013-07-17 12:39:34
 */
public class TmallEaiOrderRefundOrderHoldRequest implements TaobaoRequest<TmallEaiOrderRefundOrderHoldResponse> {

	private Map<String, String> headerMap = new TaobaoHashMap();
	private TaobaoHashMap udfParams; // add user-defined text parameters
	private Long timestamp;

	/** 
	* 1. 截停成功
2. 截停失败
	 */
	private Long holdResult;

	/** 
	* 截停环节
1. 订单处理环节
2. 发货环节
	 */
	private Long holdStep;

	/** 
	* 截单时间
	 */
	private Date holdTime;

	/** 
	* 退款单编号
	 */
	private Long refundId;

	/** 
	* 售中：onsale
售后：aftersale
	 */
	private String refundPhase;

	public void setHoldResult(Long holdResult) {
		this.holdResult = holdResult;
	}
	public Long getHoldResult() {
		return this.holdResult;
	}

	public void setHoldStep(Long holdStep) {
		this.holdStep = holdStep;
	}
	public Long getHoldStep() {
		return this.holdStep;
	}

	public void setHoldTime(Date holdTime) {
		this.holdTime = holdTime;
	}
	public Date getHoldTime() {
		return this.holdTime;
	}

	public void setRefundId(Long refundId) {
		this.refundId = refundId;
	}
	public Long getRefundId() {
		return this.refundId;
	}

	public void setRefundPhase(String refundPhase) {
		this.refundPhase = refundPhase;
	}
	public String getRefundPhase() {
		return this.refundPhase;
	}

	public Long getTimestamp() {
		return this.timestamp;
	}

	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}

	public String getApiMethodName() {
		return "tmall.eai.order.refund.order.hold";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("hold_result", this.holdResult);
		txtParams.put("hold_step", this.holdStep);
		txtParams.put("hold_time", this.holdTime);
		txtParams.put("refund_id", this.refundId);
		txtParams.put("refund_phase", this.refundPhase);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public void putOtherTextParam(String key, String value) {
		if(this.udfParams == null) {
			this.udfParams = new TaobaoHashMap();
		}
		this.udfParams.put(key, value);
	}

	public Class<TmallEaiOrderRefundOrderHoldResponse> getResponseClass() {
		return TmallEaiOrderRefundOrderHoldResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkNotEmpty(holdResult,"holdResult");
		RequestCheckUtils.checkNotEmpty(holdStep,"holdStep");
		RequestCheckUtils.checkNotEmpty(holdTime,"holdTime");
		RequestCheckUtils.checkNotEmpty(refundId,"refundId");
	}

	public Map<String, String> getHeaderMap() {
		return headerMap;
	}
}
